<template>
  <div >
    <h4>用户名</h4>
    <el-input 
    v-model="userName" 
    style="width: 240px" 
    prefix-icon
    placeholder="请输入用户名" />
    <h4>密码</h4>
    <el-input
      v-model="passWord"
      style="width: 240px"
      type="password"
      placeholder="请输入密码"
      show-password
    />
    <div id="bottom">
        <el-button type="primary" @click="jumpToHome">登录</el-button>
        <el-button type="primary" @click="jumpToResgister">注册</el-button>
    </div>

  </div>
</template>

<script setup>
import router from "@/router";
import { ref } from "vue"
const userName = ref('')
const passWord = ref('')
const jumpToHome = () => {
    console.log("跳转到home")
    router.push("/home")
}
const jumpToResgister = () => {
    console.log("跳转到register")
}
</script>

<style lang="scss" scoped>

#bottom{
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}
h4{
    margin-bottom: 10px;

}
.el-input{
    margin-bottom: 10px;
}
</style>
